﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Collections;
using System.Drawing;

namespace WindowsFormsApplication1
{
    public class SqlConnection
    {
    		public SqlConnection(String m_ConnectionString)
    		{
    				
    		}
    }
    public class DataServices:DataTable
    {
        public static String DatabaseName;
        public static SqlConnection m_Connection;
        private SqlDataAdapter m_DataAdapter;
        private SqlCommand m_Command;
        public static String m_ConnectionString = "";
        public DataServices()
        {
            OpenConnection();
        }
        public SqlCommand Command
        {
            get
            {
                return m_Command;
            }
            set
            {
                m_Command = value;
            }
        }
        public void Load(SqlCommand Command)
        {
            m_Command = Command;
            try
            {
                this.Clear();
                m_Command.Connection = m_Connection;
            }
            catch (Exception e)
            {
                XtraMessageBox.Show(e.Message);
            }
        }
        public static bool OpenConnection()
        {
            try
            {
                if (m_Connection == null)
                    m_Connection = new SqlConnection(m_ConnectionString);
                if (m_Connection.State == ConnectionState.Closed)
                    m_Connection.Open();
                return true;
            }
            catch
            {
                m_Connection.Close();
                return false;
            }
        }
        public in ExecumeNoneQuery (SqlCommand cmd)
        {
            int result = 0;
            SqlTransaction tr=null ;
            try 



    }
}
